#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    
    int a = 1;
    int box= 0;
    for (int i = 1; i <= n; i++)
    {
        a = a * i;
        box = box + a;
    }
    cout << box;
}